<?php $themeUri = get_template_directory_uri(); ?>
<?php $serviceCid = 2; ?>
<div class="col-sm-6 div_tuvan">
    <div class="bar-title">
        <a href="<?php echo get_category_link( $serviceCid ); ?> ">
            <?php echo get_cat_name( $serviceCid ) ?>
        </a>
    </div>
    <ul class="ul_product">
        <!-- list items -->
        <?php
        $queryService = new WP_Query( array('cat' => $serviceCid, 'posts_per_page' => 3));
        $cutOff = 200;
        ?>
        <?php if ( $queryService->have_posts() ) : ?>
            <?php while ( $queryService->have_posts() ) : $queryService->the_post(); ?>
            <li>
                <div class="ct_product">
                    <h3 class="title">
                        <a href="<?php the_permalink(); ?>"><?php the_title(); ?></a>
                    </h3>
                    <a href="<?php the_permalink(); ?>" class="thumb">
                        <?php the_post_thumbnail( 'service-thumb' ); ?>
                    </a>
                    <p class="lead">
                        <?php $cutOff = has_post_thumbnail( get_the_ID() ) ? 200 : 500; ?> 
                        <?php echo trim_text(get_the_excerpt(), $cutOff) ?>
                    </p>
                    <p class="view_all">
                        <a href="<?php the_permalink(); ?>" class="a_view_all"></a>
                    </p>
                </div>
            </li>
            <?php endwhile; ?>
        <?php endif; ?>
        <?php wp_reset_postdata(); ?>
        <!--/ list items -->
        
    </ul>
</div>